/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘国水
 * Date: 2025-05-04
 * Time: 15:31
 */
public class test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.levelOrder(root);
    }
    public static void main3(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        int count = binaryTree.getKLevelNodeCount(root,3);
        System.out.println(count);

    }
    public static void main2(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        int ret = binaryTree.getLeafNodeCount2(root);
        System.out.println(ret);

    }
    public static void main1(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("==============");
        int ret = binaryTree.size2(root);
        System.out.println(ret);

    }

}
